package com.ops;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

/**
 * 运维报告系统应用入口类
 * 
 * @SpringBootApplication: Spring Boot应用的核心注解，包含了@Configuration, @EnableAutoConfiguration 和 @ComponentScan
 * @extends SpringBootServletInitializer: 继承此类以支持WAR包部署
 */
@SpringBootApplication
public class OpsReportApplication extends SpringBootServletInitializer {
    
    /**
     * 应用程序入口方法
     * 启动Spring Boot应用，加载配置，初始化Spring容器
     */
    public static void main(String[] args) {
        SpringApplication.run(OpsReportApplication.class, args);
    }

    /**
     * WAR包部署时的配置方法
     * 配置Spring应用构建器，支持外部容器部署
     */
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(OpsReportApplication.class);
    }
} 